package cn.stylefeng.guns.modular.system.service;

import cn.stylefeng.guns.modular.system.entity.SchoolRelationMonth;
import cn.stylefeng.guns.modular.system.mapper.SchoolRelationMonthMapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;

/**
 * <p>
 * 学校关联考试月份 服务类
 * </p>
 *
 * @author zfy
 * @since 2020-08-12
 */
@Service
public class SchoolRelationMonthService extends
        ServiceImpl<SchoolRelationMonthMapper,SchoolRelationMonth> {

    public void add(Long schoolUserId, String examMonthIds) {
        SchoolRelationMonth schoolRelationMonth = new SchoolRelationMonth();
        schoolRelationMonth.setSchoolUserId(schoolUserId);
        schoolRelationMonth.setExamMonthIds(examMonthIds);
        schoolRelationMonth.setCreateTime(LocalDateTime.now());
        this.save(schoolRelationMonth);
    }
}
